package com.example.lemonhealth.controller;

import com.example.lemonhealth.constant.MessageConstant;
import com.example.lemonhealth.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: Lemon
 * @Description: 用户相关接口
 * @Date: 2024/12/24 10:40
 */
@Controller
@RequestMapping("user")
@Slf4j
public class UserController {

    /**
     * @Author Lemon
     * @Description 查询获得登录用户
     * @Date 2024/12/24 10:45
     * @Param []
     * @Return com.example.lemonhealth.utils.Result
     */
    @GetMapping("/getUsername.do")
    @ResponseBody
    public Result getUsername(){
        return new Result(true, MessageConstant.GET_USERNAME_SUCCESS,"admin");
    }
}
